[SIL][PackageCMO] Allow optimizing [serialized_for_pkg] functions #73902
[SIL][PackageCMO] Allow optimizing [serialized_for_pkg] functions #73902
Conversation
|
@swift-ci test |
|
We will also want to update the SwiftCompilerSources, they have instances of both usage of This code for example needs updating to take into account our canInlineInto matrix: |
|
@swift-ci test |
|
@swift-ci test macOS |
…ing SIL inlining, generic/closure specialization, and devirtualization optimization passes. SILFunction::canBeInlinedIntoCaller now exlicitly requires a caller's SerializedKind_t arg. isAnySerialized() is added as a convenience function that checks if [serialized] or [serialized_for_pkg]. Resolves rdar://128704752
|
The functional part makes sense to me. Can we add tests to ensure that these optimization passes are actually active for serialized_for_pkg functions? |
|
The added changes since my last review look good to me. We also need a change in SwiftCompilerSources/Sources/Optimizer/Utilities/OptUtils.swift to take serializedForPackage into account: |
Add isAnySerialized() and canBeInlinedIntoCaller(SerializedKind).
|
@swift-ci test |
More tests including this are in the upcoming PR. |
Allow optimizing
[serialized_for_pkg]functions during SIL inlining, generic/closure specialization, and devirtualization optimization passes.SILFunction::canBeInlinedIntoCallernow exlicitly requires a caller'sSerializedKind_targ.isAnySerialized()is added as a convenience function that checks if[serialized]or[serialized_for_pkg].Resolves rdar://128704752